home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
4671-5.790
/
dmg-4790
/
power_20
/
stoshelp.pwr
< prev
next >
Wrap
Text File
|
1989-12-31
|
8KB
|
225 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE
S T OOOO S
S T O O S
S T O O S
S TT O O S
S T T O O S
S T O O S
S T O O S
S T O O S
S T O O S
S T O O S
S T OOOOOOO S
HELP CORNER
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
YOUR STOS PROBLEMS ANSWERED BY DEANO OF SILLY SOFTWARE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well here we are again with a few more STOS problems solved by Deano of
SILLY SOFTWARE LICENCEWARE. SILLY SOFTWARE titles can be ordered directly
from Deano or from any official SILLY SOFTWARE distributor. Deano has been
programming in STOS for a long time and is a competent programmer and he's
here to take on any STOS related problems any of you may have. You can send
your problems to me at the normal POWER address and I will forward them
onto Deano or you can write directly to the man himself at the following
address:
DEANO
SILLY SOFTWARE
27 TURBARY WALK
MILNROW
ROCHDALE
OL16 4JN
Right, well here's this months STOS problems...
GREG FITTOCK:
I have recently encountered the SET LINE command but it doesn't coordinate
with my needs because I can only get it to work vertically with a thickness
of 1 or 2. Is there any way to overcome this problem or a different
command I can use that will achieve a similar effect?
POWER REPLIES:
Hmm, good one. Well I don't really bother with the STOS graphic commands
myself but it does seem that set line doesn't work with the draw command so
you need to use the others such as polyline and arc. The command seems to
work fine with these commands. I will leave this problem for other readers
to look at. Anybody know an answer?
RHYTHM:
My problem is similar to Coot's last month. I write a lot of music and am
now tinkering with a chip tune creator that James sent me and want to put it
in a small music program that I am doing for myself but for presentation
purposes, I would like the chip tune to fade out when I select another one
and when the new chip tune is loaded, I want it to fade in. Is this
possible without machine code?
POWER REPLIES:
Like modules, chip music is usually played back through STOS using a machine
code routine. Some can be played using an offset like 8 for Mad Max. But
with a machine code routine called from a bank you need to know how the
routine fades in and out, in other words, use the poke command to set the
volume to 0 from the present setting in a loop. Music played by an offset is
the same. I couldn't really tell you more without the routine.
MARIA FERKETTLE:
I have just compiled my first STOS program but it does something quite
annoying. It flashes the function commands at the top of the screen twice
quickly before the program actually starts. This looks very messy but I
know that there is a way of stopping it because I have seen other STOS
programs which don't have this problem. How do I solve it?
PS: Thanks for the STOS help you gave me last month.
POWER REPLIES:
Oh good an easy one. All you have to do is remove the commands Key Off, Mode
0, Curs Off, and Hide On from your basic listing. Enter the OPTIONS of the
compiler and click on the boxes to set the compiler. For example you will
see that the function key window can be turned off in the compiled program
by clicking on the OFF button. Compiled programs don't like the key off
command so you'll have to remove it and tell the compiler to turn it off
when you run the compiled program from GEM. This however, does not work if
you run compiled programs from memory.
Glad you found my help from last month useful.
LEWIS GREDLO:
I have three problems (hope that's not too much hassle). The first is to
do with the fade command. I have used this line:
fade 5,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,
$777,$777
It's fine when it's not in a program, I simply get the screen back with CLS
but when it's in a program, the CLS command just leaves the screen black
still and I can't even get the APPEAR command to do anything with it.
My second problem is about Scancodes. I read about them in the manual but
have no idea what they are so can you shed any light on the subject?
Finally, when I improve I would like to program the RS232 but can't find
anything in the manual about it so how do I get some information on it and
do you know if it's worthwhile?
POWER REPLIES:
Using CLS does indeed default STOS back to normal after a fade but if you
use it in a program then you'll have to fade it back yourself. Look at this
listing.
10 key off : hide on : flash off : curs off : mode 0
20 rem first set all colours to white
30 wait 10
40 fade 5,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,$777,
$777,$777,$777,$777
50 rem wait for fade to happen
60 wait 80
70 rem now fade colours back to present palette
80 fade 5,$523,$777,$0,$123,$232,...etc
What happened with your program is that the colours all faded to white and
the program ended. Therefore the colours need to be set back to the original
colours of the palette. The wait command at line 20 stops STOS from fading
the colours up too fast.
As for scancodes, well normally when you press a key, an ASCII code is
returned to STOS. In order for that to happen then you must press a normal
character key which are all numbers, letters, and signs such as plus and
minus. These characters or ASCII codes can be checked for using the inkey$
command. However, the scancode command allows you to check for a key that
doesn't return an ASCII code, such as the escape key for example.
Try this routine.......
10 key off : hide on: curs off
20 print"press a key"
30 c$=inkey
40 if c$="" then goto 30
50 if not(scancode) then print"This is an ascii character" else the scancode
for this key is ";scancode
60 goto 20
The scancode command is set to the number of the key which is not an ASCII
character, the escape key is scancode number one for example.
I don't think the RS232 port can be accessed within STOS, you would have to
use a little machine code.
MR. WILLIAMS:
In STOS, how do I print the contents of a folder without entering it?
POWER REPLIES:
In order to get at the contents of a folder you will have to enter it. You
can open it, do what you want to do and then close it like this.
10 key off : hide on
20 dir$="DATA": rem name of folder
30 print all files to screen
40 P$="*.*": N$=dir first$(P$-1): if N$="" then end
50 print N$
60 repeat
70 N$=dir next$
80 print N$
90 until N$=""
100 dir$="A:": rem close folder and default back to root directory
110 rem print contents of folder on printer
120 dir$="DATA"
130 ldir
140 dir$="A:"
Hope this is of use to you.
CHRIS SHARP:
How do I get split screen resolution in STOS? For example, half the screen
in mode 0 and the other half in mode 1 like the POWER shell main menu.
POWER REPLIES:
In STOS, this is not possible. You would need machine code. Maybe someone
knows of a routine to do this then please send it in.
DETECTIVE SERGEANT SILLY:
Can I get STOS to give me loads of sweeties?
POWER REPLIES:
No, now go away you silly person.